import './assets/main.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import App from './App.vue'
import IndexPage from './components/IndexPage.vue'
import LoginPage from './components/LoginPage.vue'
import RegistPage from './components/RegistPage.vue'
import {createRouter, createWebHashHistory} from 'vue-router'

const app = createApp(App)
app.use(ElementPlus)

const routes = [
    { path: '/index', component: IndexPage },
    { path: '/login', component: LoginPage },
    { path: '/regist', component: RegistPage }
  ]
  
  const router = createRouter({
      // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
      history: createWebHashHistory(),
      routes, // `routes: routes` 的缩写
    })
  
app.use(router)

app.mount('#app')
